<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>常德市前列腺疾病研究所</title>
  <meta name="description" content="常德市前列腺疾病研究所">
  <meta name="keywords" content="user">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="../assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="../assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="../assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="../assets/css/admin.css">
  <script type="text/javascript">
    function update() {
		var oldpassword=$("#oldpassword").val();
		var newpassword=$("#newpassword").val();
    	if(oldpassword==''){
    		alert("请输入原密码");
    		return false;
    	}
    	else if(newpassword==''){
    		alert("请输入新密码");
    		return false;
    	}
    	$.ajax({
    		cache: true,
    		type: "POST",
    		url:'/admin/login/changemm',
    		data:{"oldpassword":oldpassword,"newpassword":newpassword},
    		async: false,
    		error: function(request) {
    			alert("Connection error");
    		},
    		success: function(data) {
    		
    			if(data.err ==2){
    			
    				alert("您的账号密码错误！");
    			}
    			else if(data.err==1){
    				alert("密码正确,修改成功");
    				window.location.href='/admin/login/out';
    			}
    		}
    	});
	}
    </script>
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
#if(session.username==null)
<div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg"><a href="/admin/login">请先登录</a></strong></div>
      </div>
    </div>
    </div>

#else

#@top()
#define topcontent()
#end
<div class="am-cf admin-main">
 #@left()
#define leftcontent()
#end

  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">修改密码</strong> / <small>Change</small></div>
      </div>

      <hr/>

      <div class="am-g">
       <div class="am-u-sm-12 am-u-md-9">
                            <form class="am-form am-form-horizontal" >
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">原密码 / Password</label>
                                    <div class="am-u-sm-9">
                                        <input type="text" id="oldpassword" placeholder="密码 / Password">
                                        <small>输入你的原密码，让我们记住你。</small>
                                    </div>
                                </div>

                                   <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">新密码 / Newpassword</label>
                                    <div class="am-u-sm-9">
                                        <input type="text" id="newpassword" placeholder="密码 / Password">
                                        <small>输入你的新密码，让我们记住你。</small>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <button type="button" class="am-btn am-btn-primary" onclick="update(); return false;">保存修改</button>
                                    </div>
                                </div>
                            </form>
                        </div>
      </div>
    </div>

    <footer class="admin-content-footer">
      <hr>
      <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
    </footer>

  </div>
  <!-- content end -->

</div>
#end
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="../assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="../assets/js/amazeui.min.js"></script>

<script src="../assets/js/app.js"></script>
</body>
</html>
